﻿using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace Himp.Platform.Api.EntityFrameworkCore;

[ConnectionStringName(ApiDbProperties.ConnectionStringName)]
public class ApiDbContext : AbpDbContext<ApiDbContext>, IApiDbContext
{
    /// <summary>
    /// 工作区
    /// </summary>
    public DbSet<WorkspaceConf> WorkspaceConfs { get; set; }

    public ApiDbContext(DbContextOptions<ApiDbContext> options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureApi();
    }
}
